package com.ruoyi.statisticalCenter.service.impl;

import java.util.List;

import com.github.pagehelper.PageHelper;
import com.ruoyi.statisticalCenter.domain.vo.ScEstimatedCostVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.statisticalCenter.mapper.ScEstimatedCostMapper;
import com.ruoyi.statisticalCenter.domain.ScEstimatedCost;
import com.ruoyi.statisticalCenter.service.IScEstimatedCostService;
import com.ruoyi.common.core.text.Convert;

/**
 * 客户账单核销Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-16
 */
@Service
public class ScEstimatedCostServiceImpl implements IScEstimatedCostService
{
    @Autowired
    private ScEstimatedCostMapper scEstimatedCostMapper;

    /**
     * 查询客户账单核销
     *
     * @param id 客户账单核销主键
     * @return 客户账单核销
     */
    @Override
    public ScEstimatedCost selectScEstimatedCostById(Long id)
    {
        return scEstimatedCostMapper.selectScEstimatedCostById(id);
    }

    /**
     * 查询客户账单核销列表
     *
     * @param scEstimatedCost 客户账单核销
     * @return 客户账单核销
     */
    @Override
    public List<ScEstimatedCost> selectScEstimatedCostList(ScEstimatedCostVo scEstimatedCost)
    {
        PageHelper.startPage(scEstimatedCost.getPageDate());
        return scEstimatedCostMapper.selectScEstimatedCostList(scEstimatedCost);
    }

    /**
     * 新增客户账单核销
     *
     * @param scEstimatedCost 客户账单核销
     * @return 结果
     */
    @Override
    public int insertScEstimatedCost(ScEstimatedCost scEstimatedCost)
    {
        return scEstimatedCostMapper.insertScEstimatedCost(scEstimatedCost);
    }

    /**
     * 修改客户账单核销
     *
     * @param scEstimatedCost 客户账单核销
     * @return 结果
     */
    @Override
    public int updateScEstimatedCost(ScEstimatedCost scEstimatedCost)
    {
        return scEstimatedCostMapper.updateScEstimatedCost(scEstimatedCost);
    }

    /**
     * 批量删除客户账单核销
     *
     * @param ids 需要删除的客户账单核销主键
     * @return 结果
     */
    @Override
    public int deleteScEstimatedCostByIds(String ids)
    {
        return scEstimatedCostMapper.deleteScEstimatedCostByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除客户账单核销信息
     *
     * @param id 客户账单核销主键
     * @return 结果
     */
    @Override
    public int deleteScEstimatedCostById(Long id)
    {
        return scEstimatedCostMapper.deleteScEstimatedCostById(id);
    }
}
